package main

import (
	"github.com/gin-gonic/gin"
	"github.com/sirupsen/logrus"
	"go-web-learning/src/03_gin/12_log/logrus/4_gin-logrus/log"
	"net/http"
)

func main() {
	log.InitLogger("./src/03_gin/12_log/logrus/4_gin-logrus/logs", "testApp")
	router := gin.Default()
	router.GET("/logrus", func(c *gin.Context) {
		logrus.Infoln("啊啊哈开始的")
		c.JSON(http.StatusOK, gin.H{"msg": "success"})
	})
	router.Run()
}
